package com.atguigu.eduservice.entity.enums;

/**
 * @Author panghl
 * @Date 2021/1/24 15:58
 * @Description TODO
 **/
public enum  CourseStatus {
    Draft("Draft","未发布"),
    Normal("Normal","已发布");

    private String value;
    private String name;
    CourseStatus(String value,String name) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static String getNameByKey(Integer key){
        for (DelFlagEnum vo: DelFlagEnum.values()){
            if (vo.getValue().equals(key)){
                return vo.getName();
            }
        }
        return null;
    }
}
